package patterns.actions.interpreter.arithmetic;

public class Client {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Variables var = new Variables();

		Variable x = new Variable();
		Variable y = new Variable();
		Variable z = new Variable();
		var.put(x, 10);
		var.put(y, 20);
		var.put(z, 30);

		ArithmeticExpression e = new Subtract(new Multiply(x, new Plus(y,
				new Division(z, x))), x);
		System.out.print(e.interpret(var));
	}

}
